package com.xbongbong.saas.domain.entity;

import com.xbongbong.paas.toolbox.wrap.Entity;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.math.BigDecimal;

/**
 * @author youli.chen
 * @version v1.0
 * @description: 话务中心坐席策略实体类
 * @date 2019/2/27 16:47
 * @since v1.0
 */
@Setter
@Getter
@ToString
public class CallCenterAgentStrategyEntity extends Entity {

    public CallCenterAgentStrategyEntity() {
        this.price = new BigDecimal(120);
        this.memo = "默认的呼叫中心坐席套餐";
        this.isActive = 1;
        this.inactiveTime = 0;
    }

    public CallCenterAgentStrategyEntity(String corpid, Integer moduleType) {
        this();
        this.corpid = corpid;
        this.moduleType = moduleType;
    }

    /**
     * 主键
     */
    private Long id;
    /**
     * 公司ID
     */
    private String corpid;
    /**
     * 微应用信息，参考AppStoreTypeEnum
     */
    private Integer moduleType;
    /**
     * 坐席每月单价
     */
    private BigDecimal price;
    /**
     * 套餐备注
     */
    private String memo;
    /**
     * 是否生效
     */
    private Integer isActive;
    /**
     * 生效时间
     */
    private Integer activeTime;
    /**
     * 失效时间
     */
    private Integer inactiveTime;

    /**
     * 创建时间
     */
    private Integer addTime;
    /**
     * 更新时间
     */
    private Integer updateTime;
    /**
     * 删除标记
     */
    private Integer del;

    public BigDecimal getPrice() {
        if (price == null) {
            return new BigDecimal(0);
        }
        return price;
    }
}
